<?php
	/**
	 * ThinkSAAS CORE
	 * @copyright (c) ThinkSAAS All Rights Reserved
	 * @code by QiuJun
	 * @Email:qiniao@vip.qq.com
	 */

	@error_reporting (E_ALL & ~E_NOTICE & ~E_WARNING);
	ini_set("magic_quotes_runtime", 0);
	ini_set('session.save_path',THINKDATA."/session");
	ini_set('upload_tmp_dir',THINKDATA."/temp");
	ini_set("session.use_trans_sid","0");					//设置PHPSESSIONID
	//ini_set("session.cookie_domain","thinksaas.cn");	//设置二级域的问题
	//ini_set("session.save_handler","user");				//设置session存储方式问题
	ob_start();														//好像是可以加速访问问题
	session_set_cookie_params(24 * 3600);			 //设置session过去时间问题
	session_start();
	
	//前台用户基本数据,$TS_USER数组

	$TS_USER = array(
		'user'		=> $_SESSION['tsuser'],
	);
	
	//APP专用
	$app	= isset($_GET['app']) ? $_GET['app'] : 'group';
	//针对manyou平台的过滤
	$app = str_replace ( '/', '', $app );
	//安装
	$install = isset($_GET['install']) ? $_GET['install'] : 'index';
	
	//Action专用
	$ac	= isset($_GET['ac']) ? $_GET['ac'] : 'index';
	//纪念ThinkSNS
	$ts	= isset($_GET['ts']) ? $_GET['ts'] : '';
	//Admin管理专用
	$mg	= isset($_GET['mg']) ? $_GET['mg'] : 'index';
	//Api专用
	$api	= isset($_GET['api']) ? $_GET['api'] : 'index';
	
	//plugin专用
	$plugin = isset($_GET['plugin']) ? $_GET['plugin'] : '';
	//plugin专用
	$in = isset($_GET['in']) ? $_GET['in'] : '';

	//加载基础函数
	require_once 'fun.base.php';

	header('Content-Type: text/html; charset=UTF-8');

	//加载软件信息
	$TS_SOFT['info'] = array(
	
		'name'		=>	'ThinkSAAS',
		'version'	=>	'1.0',
		'url'			=>	'http://www.thinksaas.cn',
		'email'		=>	'qiniao@vip.qq.com',
		'copyright' =>	'ThinkSAAS',
		'year'		=>	'2009 - 2011',
		'author'		=>	'QiuJun',
	);

	date_default_timezone_set('Etc/GMT-8');